package ncu.me.musicplayer.entity;

import android.content.Intent;

import androidx.annotation.Nullable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

/**
 * @Author ye
 * @Date 2020/6/1 21:28
 * @Version 1.0
 */
@Entity
public class MusicInfo {

    @Id(autoincrement = true)
    Long id;
    @Unique
    String mid;
    String name;
    String songName;
    String url;
    String filePath;



    @Generated(hash = 1085802804)
    public MusicInfo(Long id, String mid, String name, String songName, String url,
            String filePath) {
        this.id = id;
        this.mid = mid;
        this.name = name;
        this.songName = songName;
        this.url = url;
        this.filePath = filePath;
    }

    @Generated(hash = 1735505054)
    public MusicInfo() {
    }



    @Override
    public String toString() {
        return "MusicInfo{" +
                "mid='" + mid + '\'' +
                ", name='" + name + '\'' +
                ", songName='" + songName + '\'' +
                ", url='" + url + '\'' +
                ", filePath='" + filePath + '\'' +
                '}';
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (mid == null){
            return false;
        }
        if (obj instanceof MusicInfo){
            return this.mid.equals(((MusicInfo) obj).mid);
        }
        return false;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMid() {
        return this.mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSongName() {
        return this.songName;
    }

    public void setSongName(String songName) {
        this.songName = songName;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFilePath() {
        return this.filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
